import React, { Component } from 'react';
import ResizableTable from './src/index';

class DargTable extends Component {
    componentDidMount() {
        const domElemTableList = this.tableNode.getElementsByTagName('table');
        ResizableTable(domElemTableList[0], {
            ...this.props
        });
    }
    render() {
        return (
            <div ref={node => (this.tableNode = node)}>
                {this.props.children}
            </div>
        );
    }
}

export default DargTable;
